package com.e1xp.deport_management_system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.e1xp.deport_management_system.entity.Product;
import com.e1xp.deport_management_system.exception.CustomException;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author E1xP
 * @since 2021-04-09
 */
public interface IProductService extends IService<Product> {

    long getCount(long instanceId);

    void add(Product product) throws CustomException;

    List<Product> getList(long instanceId);

    Map<Long, Product> getListFromId(long instanceId, List<Long> productIdList);

    List<Map<String, Object>> getSelection(long instanceId);

    void updateProduct(long instanceId, Product product) throws CustomException;

    Product get(long instanceId, long productId);

    void toRack(Long rackId, Long productId, Integer count, long instanceId);
}
